package com.csy.admin.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author csy
 * @since 2018-09-20
 */
@TableName("resource_tag")
public class ResourceTag extends Model<ResourceTag> {

    private static final long serialVersionUID = 1L;

    /**
     * 标签id
     */
    @TableId("tag_id")
    private Long tagId;
    /**
     * 标签名称
     */
    @TableField("tag_name")
    private String tagName;
    /**
     * 父标签id
     */
    @TableField("parent_id")
    private Long parentId;
    /**
     * 所属分类
     */
    @TableField("class_id")
    private Integer classId;
    /**
     * 作废标志
     */
    @TableField("flag_invalid")
    private Integer flagInvalid;


    /**
     * ztree属性
     */
    @TableField(exist = false)
    private Boolean open;

    public Long getTagId() {
        return tagId;
    }

    public void setTagId(Long tagId) {
        this.tagId = tagId;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Integer getFlagInvalid() {
        return flagInvalid;
    }

    public void setFlagInvalid(Integer flagInvalid) {
        this.flagInvalid = flagInvalid;
    }

    public Boolean getOpen() {
        return open;
    }

    public void setOpen(Boolean open) {
        this.open = open;
    }

    @Override
    protected Serializable pkVal() {
        return this.tagId;
    }

    @Override
    public String toString() {
        return "ResourceTag{" +
        ", tagId=" + tagId +
        ", tagName=" + tagName +
        ", parentId=" + parentId +
        ", classId=" + classId +
        ", flagInvalid=" + flagInvalid +
        "}";
    }
}
